<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        .myCenter{
            width: 300px;
            border:1px solid red;
            /*居中*/
            margin: auto;
            color: aqua;
        }
    </style>
</head>
<body>
<div class="myCenter">
    这是居中元素
</div>
</body>
</html>
